package com.fastwire.carriere.service;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

import com.fastwire.carriere.service.webui.exception.ServiceException;
import com.fastwire.carriere.user.vo.PermissionVo;
import com.fastwire.carriere.user.vo.SessionVo;
import com.fastwire.carriere.user.vo.UserGroupVo;
import com.fastwire.carriere.user.vo.UserVo;

// TODO: Auto-generated Javadoc
/**
 * The Interface UserService.
 */
@WebService(targetNamespace = "http://user.fastwire.com", name = "UserService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
public interface UserService {

	/**
	 * Authenticate user.
	 * 
	 * @param userName
	 *            the user name
	 * @param pasword
	 *            the pasword
	 * @return the string
	 * @throws ServiceException
	 *             the service exception
	 */
	@WebMethod
	public SessionVo login(UserVo userVo) throws ServiceException;

	@WebMethod
	public String logout(SessionVo sessionVo) throws ServiceException;

	/**
	 * Creates the user group.
	 * 
	 * @param userGroup
	 *            the user group
	 * @return the string
	 * @throws ServiceException
	 *             the service exception
	 */
	@WebMethod
	public @WebResult(name = "createUserGroupResponse")
	String createUserGroup(@WebParam(name = "UserGroup") UserGroupVo userGroup,
			SessionVo sessionVo) throws ServiceException;

	/**
	 * Creates the user.
	 * 
	 * @param userVo
	 *            the user vo
	 * @return the string
	 */
	@WebMethod
	public @WebResult(name = "createUserResponse")
	String createUser(UserVo userVo, SessionVo sessionVo)
			throws ServiceException;

	/**
	 * Edits the user.
	 * 
	 * @param userVo
	 *            the user vo
	 * @return the string
	 */
	@WebMethod
	public String editUser(UserVo userVo, SessionVo sessionVo)
			throws ServiceException;

	/**
	 * Gets the all system permisions.
	 * 
	 * @return the all system permisions
	 */
	@WebMethod
	public @WebResult(name = "Permission")
	List<PermissionVo> getAllSystemPermisions() throws ServiceException;

	/**
	 * Gets the userby search criteria.
	 * 
	 * @param userVo
	 *            the user vo
	 * @return the userby search criteria
	 */
	@WebMethod
	public @WebResult(name = "User")
	List<UserVo> getUserbySearchCriteria(
			@WebParam(name = "User") UserVo userVo, SessionVo sessionVo)
			throws ServiceException;

	/**
	 * Gets the user groupby search criteria.
	 * 
	 * @param searchVo
	 *            the search vo
	 * @return the user groupby search criteria
	 */
	@WebMethod
	public @WebResult(name = "UserGroup")
	List<UserGroupVo> getUserGroupbySearchCriteria(
			@WebParam(name = "UserGroup") UserGroupVo searchVo,
			SessionVo sessionVo) throws ServiceException;

	/**
	 * Delete user.
	 * 
	 * @param userId
	 *            the user id
	 * @return the string
	 */
	@WebMethod
	@WebResult(name = "deleteUserResponse")
	public String deleteUser(String userId, SessionVo sessionVo)
			throws ServiceException;

	/**
	 * Delete user group.
	 * 
	 * @param userId
	 *            the user id
	 * @return the string
	 */
	@WebMethod
	@WebResult(name = "deleteUserGroupResponse")
	public String deleteUserGroup(String userId, SessionVo sessionVo)
			throws ServiceException;

	/**
	 * Edits the user group.
	 * 
	 * @param userGroup
	 *            the user group
	 * @return the string
	 */
	@WebMethod
	public String editUserGroup(UserGroupVo userGroup, SessionVo sessionVo)
			throws ServiceException;

}
